import config from "@/config"
import http from "@/utils/request"
import tool from '@/utils/tool';

//const sdwanUrl = "https://config-server.easytier.cn/api/v1"

const sdwanUrl = "system/sdwan"

export default {
	machines: {
		url: `${config.API_URL}/system/sdwan/proxy/machines`,
		name: "获取我的菜单",
		get: async function() {
			return await http.get(this.url, {}, {
				withCredentials: false
			});
		}
	},

	summary: {
		url: `${config.API_URL}/system/sdwan/proxy/summary`,
		name: "获取我的菜单",
		get: async function() {
			return await http.get(this.url, {}, {
				withCredentials: false
			});
		}
	},




	auth: {
		login: {
			url: `${config.API_URL}/system/sdwan/login`,
			name: "获取我的菜单",
			post: async function(params) {
				params = {
					password: "367b06f55920151094dcccc09bba273a",
					username: "mradxz"
				}
				return await http.post(this.url, params);
			}
		},
		logout: {
			url: `${sdwanUrl}/auth/logout`,
			name: "获取菜单",
			get: async function() {
				return await http.get(this.url);
			}
		}
	}
}
